1. Field of the Invention
The present invention relates to techniques for accessing object properties in an object-oriented programming language. More specifically, the present invention relates to a method and an apparatus for using map objects to access properties of an object in a dynamic object-oriented programming language that allows additional properties to be defined for objects during execution.
2. Related Art
Dynamic object-oriented programming languages facilitate extending program code and/or objects during program execution, thereby providing substantial flexibility to program developers. However, because object properties can change at runtime, accessing object properties in dynamic object-oriented programming languages can involve a large number of slow, dynamic lookup operations. For instance, many runtime environments locate a property for an object by performing a time-consuming dictionary-lookup operation, which can cause the object property lookup operation to become a major performance bottleneck.
Hence, what is needed is a method and an apparatus that facilitates accessing object properties in dynamic object-oriented programming languages without the above-described limitations.